{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*"
  ,
  "Routes": [
    {
      //исходящий запрос в api
      "DownstreamPathTemplate": "/api/products",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      // входящий запрос из frond
      "UpstreamPathTemplate": "/api/products",
      "UpstreamHttpMethod": [ "GET" ]
    },
    {
      "DownstreamPathTemplate": "/api/product/{id}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/product/{id}",
      "UpstreamHttpMethod": [ "GET" ]
    },
    {
      "DownstreamPathTemplate": "/api/product",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/product",
      "UpstreamHttpMethod": [ "POST", "PUT" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        //ApiScope name
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/product/{id}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/product/{id}",
      "UpstreamHttpMethod": [ "DELETE" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/categorys",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/categorys",
      "UpstreamHttpMethod": [ "GET" ]
    },
    {
      "DownstreamPathTemplate": "/api/category/{id}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/category/{id}",
      "UpstreamHttpMethod": [ "GET" ]
    },
    {
      "DownstreamPathTemplate": "/api/category",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/category",
      "UpstreamHttpMethod": [ "POST", "PUT" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        //ApiScope name
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/category/{id}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44366
        }
      ],
      "UpstreamPathTemplate": "/api/category/{id}",
      "UpstreamHttpMethod": [ "DELETE" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    //cart
    {
      "DownstreamPathTemplate": "/api/cart/AddCart",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/AddCart",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/ApplyCoupon",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/ApplyCoupon",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/checkout",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/checkout",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/GetCart/{userId}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/GetCart/{userId}",
      "UpstreamHttpMethod": [ "GET" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/RemoveCoupon",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/RemoveCoupon",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/RemoveCart",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/RemoveCart",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    {
      "DownstreamPathTemplate": "/api/cart/UpdateCart",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7052
        }
      ],
      "UpstreamPathTemplate": "/api/cart/UpdateCart",
      "UpstreamHttpMethod": [ "POST" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    },
    //coupon
    {
      "DownstreamPathTemplate": "/api/coupon/{couponCode}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 7041
        }
      ],
      "UpstreamPathTemplate": "/api/coupon/{couponCode}",
      "UpstreamHttpMethod": [ "GET" ],
      "AuthenticationOptions": {
        "AuthenticationProviderKey": "Bearer",
        "AllowedScopes": [ "vasilek" ]
      }
    }
  ],
  "GlobalConfiguration": {
    "BaseUrl": "https://localhost:5050"
  }
}
